import { createRouter, createWebHistory } from 'vue-router'
import dmxRoutes from './cjRouter'
import lxRoutes from './lxRouter'
import dyxRoutes from './yzxRouter'
import ygRoutes from './ygRouter'
import yzpRoutes from './myRouter'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../views/LayoutView.vue'),
      children: [
        {
          path: '/',
          redirect: '/Qi'
        },
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/HomeView.vue')
        },
        {
          path: '/cate',
          name: 'cate',
          component: () => import('../views/CateView.vue')
        },
        {
          path: '/cart',
          name: 'cart',
          component: () => import('../views/CartView.vue')
        },
        {
          path: '/mine',
          name: 'mine',
          component: () => import('../views/MineView.vue')
        },
        {
          path: "/Qi",
          name: "qi",
          component: () => import('../components/cj/Qi.vue')
        }
      ]

    },
    ...dmxRoutes,
    ...lxRoutes,
    ...dyxRoutes,
    ...ygRoutes,
    ...yzpRoutes
  ]
})

export default router
